package com.ldz.redis;

import com.ldz.redis.thread.QueryThread;

import java.util.concurrent.*;

public class RedisThread {
    public static void main(String args[]){
        //创建一下线程池 使用多线程方式处理异步请求
        ExecutorService pool = new ThreadPoolExecutor(2, 3, 1000, TimeUnit.MILLISECONDS, new SynchronousQueue<Runnable>(),Executors.defaultThreadFactory(),new ThreadPoolExecutor.AbortPolicy());
        pool.execute(new Thread(new QueryThread()));
        pool.execute(new Thread(new QueryThread()));
    }
}
